<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Welcome to OTV_JSF_Spring_Hibernate_Project</title>
</h:head>
<h:body>
	<h:form>
		<table>
			<tr>
				<td><h:outputLabel
						for="id"
						value="Id : " /></td>
				<td><p:inputText
						id="id"
						value="#{loginBean.userName}" /></td>
			</tr>
			<tr>
				<td><h:outputLabel
						for="name"
						value="Name : " /></td>
				<td><p:inputText
						id="name"
						value="#{loginBean.displayName}" /></td>
			</tr>
			<tr>
				<td><p:commandButton
						id="addUser"
						value="Add"
						action="#{loginBean.addUser}"
						update="displayCount" /></td>
				<td><p:commandButton
						id="reset"
						value="Reset"
						action="#{loginBean.reset}" /></td>
				<td><p:commandButton
						id="navigate"
						value="Another page"
						action="#{loginBean.navigate}"
						ajax="false" /></td>
			</tr>
		</table>
		<p:outputPanel id="displayCount">
			<table>
				<tr>
					<td><h:outputLabel value="User added on page : " /></td>
					<td><h:outputLabel value="#{loginBean.count}" /></td>
				</tr>
			</table>
		</p:outputPanel>
	</h:form>
</h:body>
</html>
